package com.house.health.service.impl;

import com.house.health.domain.Order;
import com.house.health.domain.Page;
import com.house.health.domain.UserOrder;
import com.house.health.mapper.OrderMapper;
import com.house.health.service.IOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author DuanChangSuo
 * @date 2023/1/30 22:19
 * @description 类的描述和介绍
 **/
@Service
public class OrderServiceImpl implements IOrderService {

    @Autowired
    private OrderMapper mapper;

    @Override
    public int addOrder(Order order) {
        return mapper.addOrder(order);
    }

    @Override
    public List<UserOrder> findMyOrder(Page page) {
        return mapper.findMyOrder(page);
    }

    public List<UserOrder> findOrderMy(Page page) {
        return mapper.findOrderMy(page);
    }

    @Override
    public List<UserOrder> findAllOrder(Page page) {
        return mapper.findAllOrder(page);
    }

    @Override
    public int getOrderCount(int uID) {
        return mapper.getOrderCount(uID);
    }

    @Override
    public int deleteOrder(int oID) {
        return mapper.deleteOrder(oID);
    }

}